home *** CD-ROM | disk | FTP | other *** search
/ The Disc - MacWorld 1995 / PowerComputing (The Disc)(MacWorld 1995).ISO / mac / CDFACTOR / HCfactor / HumanCode / HumanCode.DXR / 00048_Utilities.ls < prev    next >
Encoding:
Text File  |  1995-07-14  |  6.1 KB  |  115 lines

  1. on filterQuit
  2.   if the commandDown and (the keyCode = 12) then
  3.     watchon()
  4.     stopMovie()
  5.     quit()
  6.     dontPassEvent()
  7.   end if
  8. end
  9.  
  10. on returnRGB RGB
  11.   global onIBM
  12.   if onIBM then
  13.     return RGB
  14.   else
  15.     if the colorDepth = 32 then
  16.       return integer(item RGB + 1 of "16777215,16777164,16777113,16777062,16777011,16776960,16764159,16764108,16764057,16764006,16763955,16763904,16751103,16751052,16751001,16750950,16750899,16750848,16738047,16737996,16737945,16737894,16737843,16737792,16724991,16724940,16724889,16724838,16724787,16724736,16711935,16711884,16711833,16711782,16711731,16711680,13434879,13434828,13434777,13434726,13434675,13434624,13421823,13421772,13421721,13421670,13421619,13421568,13408767,13408716,13408665,13408614,13408563,13408512,13395711,13395660,13395609,13395558,13395507,13395456,13382655,13382604,13382553,13382502,13382451,13382400,13369599,13369548,13369497,13369446,13369395,13369344,10092543,10092492,10092441,10092390,10092339,10092288,10079487,10079436,10079385,10079334,10079283,10079232,10066431,10066380,10066329,10066278,10066227,10066176,10053375,10053324,10053273,10053222,10053171,10053120,10040319,10040268,10040217,10040166,10040115,10040064,10027263,10027212,10027161,10027110,10027059,10027008,6750207,6750156,6750105,6750054,6750003,6749952,6737151,6737100,6737049,6736998,6736947,6736896,6724095,6724044,6723993,6723942,6723891,6723840,6711039,6710988,6710937,6710886,6710835,6710784,6697983,6697932,6697881,6697830,6697779,6697728,6684927,6684876,6684825,6684774,6684723,6684672,3407871,3407820,3407769,3407718,3407667,3407616,3394815,3394764,3394713,3394662,3394611,3394560,3381759,3381708,3381657,3381606,3381555,3381504,3368703,3368652,3368601,3368550,3368499,3368448,3355647,3355596,3355545,3355494,3355443,3355392,3342591,3342540,3342489,3342438,3342387,3342336,65535,65484,65433,65382,65331,65280,52479,52428,52377,52326,52275,52224,39423,39372,39321,39270,39219,39168,26367,26316,26265,26214,26163,26112,13311,13260,13209,13158,13107,13056,255,204,153,102,51,15597568,14483456,12255232,11141120,8912896,7798784,5570560,4456448,2228224,1114112,60928,56576,47872,43520,34816,30464,21760,17408,8704,4352,238,221,187,170,136,119,85,68,34,17,15658734,14540253,12303291,11184810,8947848,7829367,5592405,4473924,2236962,1118481,0")
  17.     else
  18.       if the colorDepth = 16 then
  19.         return integer(item RGB + 1 of "32767,32761,32755,32748,32742,32736,32575,32569,32563,32556,32550,32544,32383,32377,32371,32364,32358,32352,32159,32153,32147,32140,32134,32128,31967,31961,31955,31948,31942,31936,31775,31769,31763,31756,31750,31744,26623,26617,26611,26604,26598,26592,26431,26425,26419,26412,26406,26400,26239,26233,26227,26220,26214,26208,26015,26009,26003,25996,25990,25984,25823,25817,25811,25804,25798,25792,25631,25625,25619,25612,25606,25600,20479,20473,20467,20460,20454,20448,20287,20281,20275,20268,20262,20256,20095,20089,20083,20076,20070,20064,19871,19865,19859,19852,19846,19840,19679,19673,19667,19660,19654,19648,19487,19481,19475,19468,19462,19456,13311,13305,13299,13292,13286,13280,13119,13113,13107,13100,13094,13088,12927,12921,12915,12908,12902,12896,12703,12697,12691,12684,12678,12672,12511,12505,12499,12492,12486,12480,12319,12313,12307,12300,12294,12288,7167,7161,7155,7148,7142,7136,6975,6969,6963,6956,6950,6944,6783,6777,6771,6764,6758,6752,6559,6553,6547,6540,6534,6528,6367,6361,6355,6348,6342,6336,6175,6169,6163,6156,6150,6144,1023,1017,1011,1004,998,992,831,825,819,812,806,800,639,633,627,620,614,608,415,409,403,396,390,384,223,217,211,204,198,192,31,25,19,12,6,29696,27648,23552,21504,17408,14336,10240,8192,4096,2048,928,864,736,672,544,448,320,256,128,64,29,27,23,21,17,14,10,8,4,2,30653,28539,24311,22197,17969,14798,10570,8456,4228,2114,0")
  20.       else
  21.         if the colorDepth = 8 then
  22.           return RGB
  23.         else
  24.           if the colorDepth = 4 then
  25.             return integer(item RGB + 1 of "0,0,1,1,1,2,2,2,2,3,3,4,3,4,4,4,5,5,5,5,6,6,7,7,7,7,7,8,8,9,8,9,9,10,10,10,1,1,2,2,2,3,3,3,3,4,4,4,4,5,5,5,6,6,6,6,7,7,7,8,8,8,8,9,9,10,9,10,10,10,11,11,2,2,3,3,3,4,4,4,4,5,5,5,5,6,6,6,7,7,7,7,8,8,8,9,9,9,9,10,10,10,10,11,11,11,12,12,3,3,4,4,4,5,4,5,5,6,6,6,6,7,7,7,8,8,8,8,9,9,9,10,10,10,10,11,11,11,11,12,12,12,13,13,4,4,4,5,5,6,5,6,6,7,7,7,7,7,8,8,9,9,9,9,10,10,10,11,10,11,11,12,12,12,12,12,13,13,14,14,5,5,5,6,6,7,6,7,7,7,8,8,8,8,9,9,10,10,10,10,10,11,11,12,11,12,12,12,13,13,13,13,14,14,15,11,11,12,12,12,13,13,14,14,15,7,8,9,9,10,11,12,13,14,14,13,13,14,14,14,14,14,14,15,15,1,2,4,5,7,8,10,11,13,14,15")
  26.           end if
  27.         end if
  28.       end if
  29.     end if
  30.   end if
  31. end
  32.  
  33. on returnFont theFont
  34.   global onIBM
  35.   if onIBM then
  36.     if theFont = "Osaka" then
  37.       set the romanLingo to 0
  38.       return "√ØW√®√Ñ√âS√âV√âb√âN"
  39.     else
  40.       if theFont = "Helvetica" then
  41.         return "Arial"
  42.       else
  43.         if theFont = "Chicago" then
  44.           return "System"
  45.         else
  46.           if theFont = "Geneva" then
  47.             return "MS Sans Serif"
  48.           else
  49.             if theFont = "Times" then
  50.               return "Times New Roman"
  51.             else
  52.               return theFont
  53.             end if
  54.           end if
  55.         end if
  56.       end if
  57.     end if
  58.   else
  59.     return theFont
  60.   end if
  61. end
  62.  
  63. on clearPictCast
  64.   repeat with n = 1 to 25
  65.     set the picture of cast n to the picture of cast "EMPTY"
  66.   end repeat
  67. end
  68.  
  69. on setMenu
  70.   global gMenu, gMenuNumber
  71.   set gMenu to 0
  72.   installMenu(0)
  73.   updateStage()
  74.   set gMenuNumber to the number of cast "MenuText"
  75. end
  76.  
  77. on menu_File_Restart
  78.   startOver()
  79.   go("Opening")
  80.   startMovie()
  81. end
  82.  
  83. on menu_file_quit
  84.   stopMovie()
  85.   quit()
  86. end
  87.  
  88. on watchon
  89.   cursor(4)
  90. end
  91.  
  92. on watchoff
  93.   cursor(128)
  94. end
  95.  
  96. on RectToBox rectList
  97.   if ilk(rectList, #rect) then
  98.     return getAt(rectList, 1) & "," & getAt(rectList, 2) & "," & getAt(rectList, 3) & "," & getAt(rectList, 4)
  99.   else
  100.     alert(rectList && "is not RECT!!")
  101.   end if
  102. end
  103.  
  104. on BoxToRect boxString
  105.   if the number of items in boxString = 4 then
  106.     set l to integer(item 1 of boxString)
  107.     set t to integer(item 2 of boxString)
  108.     set r to integer(item 3 of boxString)
  109.     set b to integer(item 4 of boxString)
  110.     return rect(l, t, r, b)
  111.   else
  112.     alert(boxString && "is not BOX!!")
  113.   end if
  114. end
  115.